#include "Player.h"
#include "World.h"

Player::Player(void)
{
	m_world = NULL;
}

Player::Player( World* world )
{
	m_world = world;
}
Player::~Player(void)
{
}

void Player::Update( uint16 diff )
{
	sf::RenderWindow* window = m_world ? m_world->GetWindow() : NULL;
	
	if(!window) return;
	const sf::Input& input = window->GetInput();

	if(input.IsKeyDown(sf::Key::Return)) {
		Settings s;
		s.SetUint32Value("type", 2);
		m_world->GetEntityMgr().AddEntity(s);
	}
}